package com.emperor.core.app;

import java.util.List;
import java.util.Map;

import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

import com.emperor.core.logic.BizModel;

public interface App {

	public Map<String, Object> getParams();
	public void setParams(Map<String, Object> params);
	
	public void open();
	
	public BizModel setModel(Composite composite, BizModel model);
	public BizModel setModel(Composite composite, String prefix, BizModel model);
	
	public BizModel preAdd(BizModel model, Map<String, Object> params);
	public BizModel preUpdate(BizModel model, Map<String, Object> params);
	
	public void centreShell(Shell shell);
	public void initScreen(Shell shell, Map<String, Object> params);
	public void pickDate(Shell shell, Text text);
	public void gotoLogout(Shell shell, Map<String, Object> params);
	public void gotoExit(Shell shell, Map<String, Object> params);
	public void gotoHelp(Shell shell, Map<String, Object> params);
	public void gotoAbout(Shell shell, Map<String, Object> params);
	public void buildStandardMenu(Shell shell, Map<String, Object> params, String ctrl, String action);
	public int message(Shell shell, String text, String message);
	public int message(Shell shell, String text, String message, Integer status);
	public int message(Shell shell, String text, List<String> errors, Integer status);
	public Shell getShell();
	
}
